﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rappelz.GameServer
{
    public interface IBaseProc
    {
        void onProcess(int nThreadIdx);
    }

    public class SchedulerObject : IBaseProc
    {
        public enum Priority : int
        {
            Null = -1,
            Idle = 0,
            Lowest = 1,
            Low = 2,
            Normal = 3,
            High = 4,
            Highest = 5,
            Dummy = 6,
        }

// UserDefinedType: ArSchedulerObject
// VTable         :   , Type:  *
// Function       :   public void ArSchedulerObject(const struct ArSchedulerObject &)
// Function       :   public void ArSchedulerObject::ArSchedulerObject()
// Function       :   public unsigned int ArSchedulerObject::GetHandle()
        public virtual void onProcess(int nThreadIdx)
        {

        }
// Function       :   public bool IsEnable()
// Function       :   public void Disable()
// Function       :   public bool IsDeleteRequested()
// Function       :   public volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY GetPriority()
// Function       :   public volatile unsigned int GetPriorityQueueIndex()
// Function       :   public volatile int GetPendingPriority()
// Function       :   public volatile int GetFinalPriority()
// Function       :   public void EnterSpinLock()
// Function       :   public void LeaveSpinLock()
// Function       :   public volatile __int64 GetLastProcTime()
// Function       :   public volatile unsigned int GetLastProcTick()
        public bool bIsDeleteRequested;// Data           :   this+0x8, Member, Type: volatile bool, 
        public long last_proc_time;// Data           :   this+0x10, Member, Type: volatile __int64, 
        public uint last_proc_tick;// Data           :   this+0x18, Member, Type: volatile unsigned int, 
        public Priority pending_priority = Priority.Null;// Data           :   this+0x1C, Member, Type: volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY, 
        public int pending_thread_index = -1;// Data           :   this+0x20, Member, Type: volatile int, 
        public int pending_priority_queue_index = -1;// Data           :   this+0x24, Member, Type: volatile unsigned int, 
        public Priority priority = Priority.Idle;// Data           :   this+0x28, Member, Type: volatile enum ArSchedulerObject::AR_OBJECT_PRIORITY, 
        public int thread_index = -1;// Data           :   this+0x2C, Member, Type: volatile int, 
        public int priority_queue_index = -1;// Data           :   this+0x30, Member, Type: volatile unsigned int, 
// Data           :   this+0x34, Member, Type: volatile int, lock

        public virtual bool ProcDelete()
        {
            return true;
        }

        public virtual bool IsDeleteable()
        {
            return true;// this.pending_priority == Priority.Null && this.priority == Priority.Idle; 
        }
// Function       :   protected void ArSchedulerObject::~ArSchedulerObject()
        public bool m_bIsEnable = true;// Data           :   this+0x38, Member, Type: volatile bool, 
// Function       :   public struct ArSchedulerObject & operator=(const struct ArSchedulerObject &)
// Function       :   public void __local_vftable_ctor_closure()
// Function       :   protected void * __vecDelDtor(unsigned int)

    }
}
